import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:verse_systems/res/colors.dart';
import 'package:verse_systems/utils/image_utils.dart';

class EmptyDataPage extends StatelessWidget {
  final String? emptyPageImage, emptyString;
  const EmptyDataPage({super.key, this.emptyPageImage, this.emptyString});

  @override
  Widget build(BuildContext context) {
    return Container(
        padding: EdgeInsets.all(30.w),
        child: Column(
          children: [
            Image.asset(
              ImageUtils.getImgPath(emptyPageImage ?? "ic_home_top_bg"),
              fit: BoxFit.fill,
            ),
            SizedBox(height: 20.w),
            Text(
              emptyString ?? "未关联到您学习的学习课程",
              style: TextStyle(color: Colours.sub_title_color, fontSize: 14.sp),
            ),
          ],
        ));
  }
}

class EmptyListPage extends StatelessWidget {
  final double? height;
  const EmptyListPage({super.key, this.height = 90});

  @override
  Widget build(BuildContext context) {
    return ListView.separated(
      itemCount: 8,
      separatorBuilder: (BuildContext context, int index) {
        return const SizedBox(height: 0);
      },
      itemBuilder: (BuildContext context, int index) {
        return Container(
          margin: EdgeInsets.symmetric(horizontal: 10.w, vertical: 5.w),
          height: height!.w,
          color: const Color(0xFFF1F1F1),
        );
      },
    );
  }
}
